﻿using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EfSandbox.Entities.Final.Eod.Raw.Mappings {
    public class RawSymbolMap : EntityTypeConfiguration<RawSymbol> {
        public RawSymbolMap() {
            ToTable("raw.eod_symbols");

            HasKey(s => s.RawSymbolId);

            Property(s => s.RawSymbolId)
                .HasColumnName("sym_id");

            Property(s => s.Name)
                .IsRequired()
                .IsUnicode(false)
                .HasMaxLength(250)
                .HasColumnName("sym_desc");

            Property(s => s.Code)
                .IsRequired()
                .IsUnicode(false)
                .HasMaxLength(25)
                .HasColumnName("sym_cd");

            Property(s => s.ExchangeCode)
                .IsRequired()
                .IsUnicode(false)
                .HasMaxLength(25)
                .HasColumnName("sym_exc_cd");
        }

    }
}
